module.exports = function (sequelize, DataTypes) {
    const Brand = sequelize.define(
        'brand',
        {
            name: {
                type: DataTypes.STRING,
                allowNull: false,
                comment: '品牌名字',
            },
            logoName: {
                type: DataTypes.STRING,
                allowNull: false,
                comment: '品牌logo字母',
            },
            createBrandTime: {
                type: DataTypes.STRING,
                allowNull: false,
                comment: '品牌创建时间'
            },
            createLocation: {
                type: DataTypes.STRING,
                allowNull: false,
                comment: '品牌创建地点'
            },
            logo: {
                type: DataTypes.STRING,
                // allowNull: false,
                comment: '品牌logo'
            },
            description: {
                type: DataTypes.TEXT('long'),
                allowNull: false,
                comment: '品牌描述'
            },
            createdByUserId: {
                type: DataTypes.STRING,
                allowNull: false,
                comment: '创建人Id'
            }
        },
        {
            timestamps: true, //createAt updateAt是否显示
            createdAt: 'createdTime', // 将createdAt设为自定义字段createdTime
            updatedAt: 'updatedTime',
            deletedAt: 'deletedTime',
            paranoid: true
        }
    )

    return Brand
}

